package com.chengqj.decorator;

import java.io.IOException;

/**
 * @program: pattern
 * @description: 具体装饰角色
 * @author: chengqj
 * @create: 2018-08-03 09:32
 **/
public class DataInputStream extends FileInputStream implements DataInput{
    public InputStream inputStream;

    public DataInputStream(InputStream inputStream) {
        this.inputStream = inputStream;
    }

    @Override
    public int read() {
        System.out.println("扩展部分功能");
        return inputStream.read();
    }

    @Override
    public String readLine() throws IOException {
        System.out.println("读取行信息");
        return null;
    }
}
